package com.ls.hnks.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.ls.hnks.service.UserService;
import com.ls.hnks.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired
    private UserService userService;

    // 测试登录  ---- http://localhost:8088/doLogin
    @SaIgnore
    @PostMapping("doLogin")
    public Result doLogin(String phone, String pwd) {
        return userService.loginByPassword(phone,pwd);
    }
}
